Numerical function rule examples

Numerical function rule examples

Numerical functions are used with number and currency variables to perform basic and complex arithmetic calculations, trigonometric calculations and maximum/minimum calculations.

Be sure to use the exact syntax for these functions including spacing and parentheses as specified below.

Rule examples

Function Example rule Inputs Outputs
Number

the number =Number(the number text)

the number text: 15 the number = 15
Addition

the total = the first amount + the second amount

the first amount: 2; the second amount: 3

the total = 5
Subtraction

the total = the first amount - the second amount

the first amount: 100; the second amount: 5 the total = 95
Multiplication

the total = the first amount * the second amount

the first amount: 7; the second amount: 2

the total = 14
Division

the total = the first amount / the second amount

the first amount: 10; the second amount: 5 the total = 2
Integer Division

the result = the value \ 5

the value: 54.25 the result = 10
Remainder after Integer Division

the total = the first amount modulo the second amount

the first amount: 9; the second amount: 3

the result = 0
Maximum

the highest number of fish caught = Maximum(the number of fish caught by Bob, the number of fish caught by Mary)

the number of fish caught by Bob: 8; the number of fish caught by Mary: 7 the highest number of fish caught =8
Minimum

the score for the better round of golf = the lesser of the score of the round of golf for James and the score of the round of golf for Simon

the score of the round of golf for James: 75; the score of the round of golf for Simon: 80 the score for the better round of golf = 75
Exponentiation (xy)

the result = Xy(the value,3)

the value: 5 the result = 125
Mathematical Constant (ex)

the result = Ex(the value)

the value: 0.3527 the result = 1.42290420813407
Absolute value

the result = Abs(the value)

the value: -80 the result = 80
Natural Logarithm

the result = Ln(the value)

the value: 0.3527 the result = -1.04213744174013
Logarithm Base

the result = Log(the value)

the value: 0.3527 the result = -0.45259454033251
Square Root

the result = Sqrt(the value)

the value: 64 the result = 8
Round

the result = Round(the value,3)

the value: 2.45678

the result = 2.457
Truncation

the result = Trunc(the value,1)

the value: 64.4657

the result = 64.4
Sine

the result = Sin(the value)

the value: 0.3527 the result = 0.345432860836779
Cosine

the result = Cos(the value)

the value: 0.3527 the result = 0.938443465880667
Tangent

the result = Tan(the value)

the value: 0.3527 the result = 0.368091284553421
Inverse Sine

the result = Asin(the value)

the value: 0.3527 the result = 0.360454968099581
Inverse Cosine

the result = Acos(the value)

the value: 0.3527 the result = 1.21034135869532
Inverse Tangent

the result = Atan(the value)

the value: 0.3527 the result = 0.339078136684554

 

TIP: The localized syntax for these functions may be viewed:

 

See also: